package com.cj.mobile.iabp.mvp.model.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 包名： com.cj.mobile.iabp.mvp.model.entity
 * 对象名： SmallLoanInfoResponse
 * 描述：小贷-主体信息
 * 作者： wly
 * 邮箱：wangliyang206@163.com
 * 创建日期： 2018/6/13 17:38
 */

public class SmallLoanInfoResponse implements Parcelable {

    public SmallLoanInfoResponse() {
    }

    /**
     * 状态和流程控制
     */
    public SmallLoanInfoResponse(int status, int step) {
        this.status = status;
        this.step = step;
    }

    public SmallLoanInfoResponse(String name, String bankCardReservePhone, int status, int step, String apsReason) {
        this.name = name;
        this.bankCardReservePhone = bankCardReservePhone;
        this.status = status;
        this.step = step;
        this.apsReason = apsReason;
    }

    public SmallLoanInfoResponse(int status, int step, double origPrcp) {
        this.name = name;
        this.bankCardReservePhone = bankCardReservePhone;
        this.status = status;
        this.step = step;
        this.origPrcp = origPrcp;
    }


    /**
     * 首页
     */
    public SmallLoanInfoResponse(double origPrcp, double lines, double applyAmount) {
        this.origPrcp = origPrcp;
        this.lines = lines;
        this.applyAmount = applyAmount;
    }

    /**
     * apsReason : null
     * repaymentAmount : 0
     * emId : 430521198802096151
     * idNo : 430521198802096151
     * applyAmount : 300000
     * appSeq : 01585035-1d06-403b-a000-42c13e28dc99
     * company : 小李子资质商
     * contactAddress : 深圳市福田区荣超大厦
     * id : 3
     * contactRelate : 1
     * lines : 300000
     * orgiId : ORG400237
     * idCardSideFront :
     * companyCode : 913701007478198233
     * bankCardNo : 658741256387125
     * businessImageScale :
     * contactName : 曾稀贤
     * mobile : 15323870209
     * productNum : CP1812120047
     * emName : null
     * idCardSideBackScale :
     * businessImage :
     * regTime : 1
     * bankCardReservePhone : 15323870209
     * idCardSideBack :
     * origPrcp : 0
     * name : 曾稀贤
     * idCardSideFrontScale :
     * step : 3
     * contactPhone : 15323870209
     * applyTerm : 3
     * firstOrderTime : 1
     * status : 0
     */

    // 主键id
    private int id;
    // 资质商id
    private String orgiId;
    // 申请序列号
    private String appSeq;
    // 姓名
    private String name;
    // 身份证号
    private String idNo;
    // 电话
    private String mobile;
    // 开户行
    private String bankName;
    // 银行卡号
    private String bankCardNo;
    // 银行预留手机号
    private String bankCardReservePhone;
    // 产品编码
    private String productNum;
    // 身份证照片面
    private String idCardSideFront;
    // 身份证照片面
    private String idCardSideFrontScale;
    // 身份证国徽面
    private String idCardSideBack;
    // 身份证国徽面
    private String idCardSideBackScale;
    // 营业执照
    private String businessImage;
    // 营业执照
    private String businessImageScale;
    // 法人姓名
    private String emName;
    // 法人身份证号
    private String emId;
    // 资质商名称
    private String company;
    // 统一社会信用代码
    private String companyCode;

    // 企业申请金额（单位：元）
    private double applyAmount;
    // 企业申请还款期数
    private int applyTerm;
    // 状态：0：待审核；1：风控通过；9：审核不通过
    private int status;
    // 联系人姓名
    private String contactName;
    // 联系人关系
    private String contactRelate;
    // 联系人电话
    private String contactPhone;
    // 本人居住地详细地址
    private String address;
    // 借款总金额
    private double origPrcp;
    // 已还金额
    private double repaymentAmount;
    // 可借额度
    private double lines;
    // 平台第一笔交易时间
    private String firstOrderTime;
    // 平台注册时间
    private long regTime;
    // 风控流程步骤：0：未填写四要素；1：验4；2：身份证识别；3：营业执照识别；4：授信提交；
    private int step;
    // 授信失败原因
    private String apsReason;
    // 区域id
    private String areaId;
    // 区域
    private String areaName;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getOrgiId() {
        return orgiId;
    }

    public void setOrgiId(String orgiId) {
        this.orgiId = orgiId;
    }

    public String getAppSeq() {
        return appSeq;
    }

    public void setAppSeq(String appSeq) {
        this.appSeq = appSeq;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIdNo() {
        return idNo;
    }

    public void setIdNo(String idNo) {
        this.idNo = idNo;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getBankName() {
        return bankName;
    }

    public void setBankName(String bankName) {
        this.bankName = bankName;
    }

    public String getBankCardNo() {
        return bankCardNo;
    }

    public void setBankCardNo(String bankCardNo) {
        this.bankCardNo = bankCardNo;
    }

    public String getBankCardReservePhone() {
        return bankCardReservePhone;
    }

    public void setBankCardReservePhone(String bankCardReservePhone) {
        this.bankCardReservePhone = bankCardReservePhone;
    }

    public String getProductNum() {
        return productNum;
    }

    public void setProductNum(String productNum) {
        this.productNum = productNum;
    }

    public String getIdCardSideFront() {
        return idCardSideFront;
    }

    public void setIdCardSideFront(String idCardSideFront) {
        this.idCardSideFront = idCardSideFront;
    }

    public String getIdCardSideFrontScale() {
        return idCardSideFrontScale;
    }

    public void setIdCardSideFrontScale(String idCardSideFrontScale) {
        this.idCardSideFrontScale = idCardSideFrontScale;
    }

    public String getIdCardSideBack() {
        return idCardSideBack;
    }

    public void setIdCardSideBack(String idCardSideBack) {
        this.idCardSideBack = idCardSideBack;
    }

    public String getIdCardSideBackScale() {
        return idCardSideBackScale;
    }

    public void setIdCardSideBackScale(String idCardSideBackScale) {
        this.idCardSideBackScale = idCardSideBackScale;
    }

    public String getBusinessImage() {
        return businessImage;
    }

    public void setBusinessImage(String businessImage) {
        this.businessImage = businessImage;
    }

    public String getBusinessImageScale() {
        return businessImageScale;
    }

    public void setBusinessImageScale(String businessImageScale) {
        this.businessImageScale = businessImageScale;
    }

    public String getEmName() {
        return emName;
    }

    public void setEmName(String emName) {
        this.emName = emName;
    }

    public String getEmId() {
        return emId;
    }

    public void setEmId(String emId) {
        this.emId = emId;
    }

    public String getCompany() {
        return company;
    }

    public void setCompany(String company) {
        this.company = company;
    }

    public String getCompanyCode() {
        return companyCode;
    }

    public void setCompanyCode(String companyCode) {
        this.companyCode = companyCode;
    }

    public double getApplyAmount() {
        return applyAmount;
    }

    public void setApplyAmount(double applyAmount) {
        this.applyAmount = applyAmount;
    }

    public int getApplyTerm() {
        return applyTerm;
    }

    public void setApplyTerm(int applyTerm) {
        this.applyTerm = applyTerm;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getContactName() {
        return contactName;
    }

    public void setContactName(String contactName) {
        this.contactName = contactName;
    }

    public String getContactRelate() {
        return contactRelate;
    }

    public void setContactRelate(String contactRelate) {
        this.contactRelate = contactRelate;
    }

    public String getContactPhone() {
        return contactPhone;
    }

    public void setContactPhone(String contactPhone) {
        this.contactPhone = contactPhone;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public double getOrigPrcp() {
        return origPrcp;
    }

    public void setOrigPrcp(double origPrcp) {
        this.origPrcp = origPrcp;
    }

    public double getRepaymentAmount() {
        return repaymentAmount;
    }

    public void setRepaymentAmount(double repaymentAmount) {
        this.repaymentAmount = repaymentAmount;
    }

    public double getLines() {
        return lines;
    }

    public void setLines(double lines) {
        this.lines = lines;
    }

    public String getFirstOrderTime() {
        return firstOrderTime;
    }

    public void setFirstOrderTime(String firstOrderTime) {
        this.firstOrderTime = firstOrderTime;
    }

    public long getRegTime() {
        return regTime;
    }

    public void setRegTime(long regTime) {
        this.regTime = regTime;
    }

    public int getStep() {
        return step;
    }

    public void setStep(int step) {
        this.step = step;
    }

    public String getApsReason() {
        return apsReason;
    }

    public void setApsReason(String apsReason) {
        this.apsReason = apsReason;
    }

    public String getAreaId() {
        return areaId;
    }

    public void setAreaId(String areaId) {
        this.areaId = areaId;
    }

    public String getAreaName() {
        return areaName;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.id);
        dest.writeString(this.orgiId);
        dest.writeString(this.appSeq);
        dest.writeString(this.name);
        dest.writeString(this.idNo);
        dest.writeString(this.mobile);
        dest.writeString(this.bankName);
        dest.writeString(this.bankCardNo);
        dest.writeString(this.bankCardReservePhone);
        dest.writeString(this.productNum);
        dest.writeString(this.idCardSideFront);
        dest.writeString(this.idCardSideFrontScale);
        dest.writeString(this.idCardSideBack);
        dest.writeString(this.idCardSideBackScale);
        dest.writeString(this.businessImage);
        dest.writeString(this.businessImageScale);
        dest.writeString(this.emName);
        dest.writeString(this.emId);
        dest.writeString(this.company);
        dest.writeString(this.companyCode);
        dest.writeDouble(this.applyAmount);
        dest.writeInt(this.applyTerm);
        dest.writeInt(this.status);
        dest.writeString(this.contactName);
        dest.writeString(this.contactRelate);
        dest.writeString(this.contactPhone);
        dest.writeString(this.address);
        dest.writeDouble(this.origPrcp);
        dest.writeDouble(this.repaymentAmount);
        dest.writeDouble(this.lines);
        dest.writeString(this.firstOrderTime);
        dest.writeLong(this.regTime);
        dest.writeInt(this.step);
        dest.writeString(this.apsReason);
        dest.writeString(this.areaId);
        dest.writeString(this.areaName);
    }

    protected SmallLoanInfoResponse(Parcel in) {
        this.id = in.readInt();
        this.orgiId = in.readString();
        this.appSeq = in.readString();
        this.name = in.readString();
        this.idNo = in.readString();
        this.mobile = in.readString();
        this.bankName = in.readString();
        this.bankCardNo = in.readString();
        this.bankCardReservePhone = in.readString();
        this.productNum = in.readString();
        this.idCardSideFront = in.readString();
        this.idCardSideFrontScale = in.readString();
        this.idCardSideBack = in.readString();
        this.idCardSideBackScale = in.readString();
        this.businessImage = in.readString();
        this.businessImageScale = in.readString();
        this.emName = in.readString();
        this.emId = in.readString();
        this.company = in.readString();
        this.companyCode = in.readString();
        this.applyAmount = in.readDouble();
        this.applyTerm = in.readInt();
        this.status = in.readInt();
        this.contactName = in.readString();
        this.contactRelate = in.readString();
        this.contactPhone = in.readString();
        this.address = in.readString();
        this.origPrcp = in.readDouble();
        this.repaymentAmount = in.readDouble();
        this.lines = in.readDouble();
        this.firstOrderTime = in.readString();
        this.regTime = in.readLong();
        this.step = in.readInt();
        this.apsReason = in.readString();
        this.areaId = in.readString();
        this.areaName = in.readString();
    }

    public static final Creator<SmallLoanInfoResponse> CREATOR = new Creator<SmallLoanInfoResponse>() {
        @Override
        public SmallLoanInfoResponse createFromParcel(Parcel source) {
            return new SmallLoanInfoResponse(source);
        }

        @Override
        public SmallLoanInfoResponse[] newArray(int size) {
            return new SmallLoanInfoResponse[size];
        }
    };
}
